import request from "@/utils/request";

// 查询辅料信息列表
export function listIngredients(query) {
  return request({
    url: "/system/ingredients/list",
    method: "get",
    params: query,
  });
}

// 查询辅料信息详细
export function getIngredients(id) {
  return request({
    url: "/system/ingredients/" + id,
    method: "get",
  });
}

// 新增辅料信息
export function addIngredients(data) {
  return request({
    url: "/system/ingredients",
    method: "post",
    data: data,
  });
}

// 修改辅料信息
export function updateIngredients(data) {
  return request({
    url: "/system/ingredients",
    method: "put",
    data: data,
  });
}

// 删除辅料信息
export function delIngredients(id) {
  return request({
    url: "/system/ingredients/" + id,
    method: "delete",
  });
}

// 辅料名称三级目录
export function getModel(query) {
  return request({
    url: "/system/ingredients/getModel",
    method: "get",
    params: query,
  });
}
